home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / nsIURILoader.idl < prev    next >
Text File  |  2006-05-08  |  5KB  |  116 lines

  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
  2. /* ***** BEGIN LICENSE BLOCK *****
  3.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4.  *
  5.  * The contents of this file are subject to the Mozilla Public License Version
  6.  * 1.1 (the "License"); you may not use this file except in compliance with
  7.  * the License. You may obtain a copy of the License at
  8.  * http://www.mozilla.org/MPL/
  9.  *
  10.  * Software distributed under the License is distributed on an "AS IS" basis,
  11.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12.  * for the specific language governing rights and limitations under the
  13.  * License.
  14.  *
  15.  * The Original Code is mozilla.org code.
  16.  *
  17.  * The Initial Developer of the Original Code is
  18.  * Netscape Communications Corporation.
  19.  * Portions created by the Initial Developer are Copyright (C) 1999
  20.  * the Initial Developer. All Rights Reserved.
  21.  *
  22.  * Contributor(s):
  23.  *
  24.  * Alternatively, the contents of this file may be used under the terms of
  25.  * either of the GNU General Public License Version 2 or later (the "GPL"),
  26.  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  27.  * in which case the provisions of the GPL or the LGPL are applicable instead
  28.  * of those above. If you wish to allow use of your version of this file only
  29.  * under the terms of either the GPL or the LGPL, and not to allow others to
  30.  * use your version of this file under the terms of the MPL, indicate your
  31.  * decision by deleting the provisions above and replace them with the notice
  32.  * and other provisions required by the GPL or the LGPL. If you do not delete
  33.  * the provisions above, a recipient may use your version of this file under
  34.  * the terms of any one of the MPL, the GPL or the LGPL.
  35.  *
  36.  * ***** END LICENSE BLOCK ***** */
  37.  
  38. #include "nsISupports.idl"
  39.  
  40. interface nsIURIContentListener;
  41. interface nsIURI;
  42. interface nsILoadGroup;
  43. interface nsIProgressEventSink;
  44. interface nsIChannel;
  45. interface nsIRequest;
  46. interface nsIStreamListener;
  47. interface nsIInputStream;
  48. interface nsIInterfaceRequestor;
  49.  
  50. /**
  51.  * The uri dispatcher is responsible for taking uri's, determining
  52.  * the content and routing the opened url to the correct content 
  53.  * handler. 
  54.  *
  55.  * When you encounter a url you want to open, you typically call 
  56.  * openURI, passing it the content listener for the window the uri is 
  57.  * originating from. The uri dispatcher opens the url to discover the 
  58.  * content type. It then gives the content listener first crack at 
  59.  * handling the content. If it doesn't want it, the dispatcher tries
  60.  * to hand it off one of the registered content listeners. This allows
  61.  * running applications the chance to jump in and handle the content.
  62.  *
  63.  * If that also fails, then the uri dispatcher goes to the registry
  64.  * looking for the preferred content handler for the content type
  65.  * of the uri. The content handler may create an app instance
  66.  * or it may hand the contents off to a platform specific plugin
  67.  * or helper app. Or it may hand the url off to an OS registered 
  68.  * application. 
  69.  */
  70. [scriptable, uuid(5cf6420c-74f3-4a7c-bc1d-f5756d79ea07)]
  71. interface nsIURILoader : nsISupports
  72. {
  73.   /**
  74.    * As applications such as messenger and the browser are instantiated,
  75.    * they register content listener's with the uri dispatcher corresponding
  76.    * to content windows within that application. 
  77.    *
  78.    * Note to self: we may want to optimize things a bit more by requiring
  79.    * the content types the registered content listener cares about.
  80.    *
  81.    * @param aContentListener the listener to register
  82.    *
  83.    * @see the nsIURILoader class description
  84.    */
  85.   void registerContentListener   (in nsIURIContentListener aContentListener);
  86.   void unRegisterContentListener (in nsIURIContentListener aContentListener);
  87.  
  88.   /**
  89.    * OpenURI requires the following parameters.....
  90.    * @param aChannel
  91.    *        The channel that should be opened. This must not be asyncOpen'd yet!
  92.    *        If a loadgroup is set on the channel, it will get replaced with a
  93.    *        different one.
  94.    * @param aIsContentPreferred
  95.    *        Should the content be displayed in a container that prefers the
  96.    *        content-type, or will any container do.
  97.    * @param aWindowContext
  98.    *        If you are running the url from a doc shell or a web shell, this is
  99.    *        your window context. If you have a content listener you want to
  100.    *        give first crack to, the uri loader needs to be able to get it
  101.    *        from the window context. We will also be using the window context
  102.    *        to get at the progress event sink interface.
  103.    *        <b>Must not be null!</b>
  104.    */ 
  105.   void openURI(in nsIChannel aChannel,
  106.                in boolean aIsContentPreferred,
  107.                in nsIInterfaceRequestor aWindowContext);
  108.  
  109.  
  110.   /**
  111.    * Stops an in progress load
  112.    */
  113.   void stop(in nsISupports aLoadCookie);
  114. };
  115.  
  116.